projects
/
babl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3b51ba0
)
tests: use a epsilon instead of == for float compare
author
Øyvind Kolås
<pippin@gimp.org>
Mon, 25 Sep 2017 18:33:17 +0000
(20:33 +0200)
committer
Øyvind Kolås
<pippin@gimp.org>
Mon, 25 Sep 2017 18:33:17 +0000
(20:33 +0200)
tests/grayscale_to_rgb.c
patch
|
blob
|
history
diff --git
a/tests/grayscale_to_rgb.c
b/tests/grayscale_to_rgb.c
index 7da0c86fa70725711ed8867872318ae43bef5cdb..b239e2395d409f66d2a5172e307133da969dbab8 100644
(file)
--- a/
tests/grayscale_to_rgb.c
+++ b/
tests/grayscale_to_rgb.c
@@
-59,7
+59,7
@@
test (void)
for (i = 0; i < PIXELS * 3; i++)
{
- if (
rgb_buf[i] != rgb_buf_ref[i]
)
+ if (
fabs (rgb_buf[i] - rgb_buf_ref[i]) > 0.0000001
)
{
babl_log ("index %i is problematic : %f instead of %f",
i, rgb_buf[i], rgb_buf_ref[i]);